<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorator="manage/manage_layout">

<head>
    <title>在线用户管理</title>
</head>

<body class="manage">

<div layout:fragment="content">
    <div class="container-fluid">
        <table class="w100">
            <thead>
            <tr>
                <th>表名</th>
                <th>表行数</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="table:${tables}">
                <td th:text="${table.name}"></td>
                <td th:text="${table.count}"></td>
                <td>
                    <a href='javascript:;' class='btn btn-xs text-info'
                       th:onclick="'javascript:tableView(\''+${table.name}+'\')'"><span
                            class='glyphicon glyphicon-info-sign'></span> 查看</a>
                    <a href='javascript:;' class='btn btn-xs text-danger'
                    th:onclick="'javascript:tableBackupDialog(\''+${table.name}+'\')'"><span
                        class='glyphicon glyphicon-dashboard'></span> 备份</a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>

    <script th:replace="common/common_libs::commonjs"></script>
    <script src="/js/manage/db.js"></script>

    <div class="modal fade" tabindex="-1" role="dialog" id="dialogTableInfo">
        <div class="modal-dialog" role="document" style="width:800px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"></h4>
                </div>
                <div class="modal-body">
                    <table>
                        <thead>
                        <th>字段名称</th>
                        <th>字段类型</th>
                        <th>模式名</th>
                        <th>字段长度</th>
                        </thead>
                        <tbody id="tableInfo">

                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>